#ifndef GLVID_H
#define GLVID_H

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __WIN32__
#ifndef DLL_EXPORT
#define DLL_EXPORT __declspec(dllexport)
#endif
#else
#define DLL_EXPORT
#endif

typedef struct _VidSource VidSource;
typedef struct _VidFrame VidFrame;


struct _VidSource
{
	int 	index;
	double  current_time;
	double  total_time;
	int     video_width;
	int     video_height;
	double  video_fps;
};

struct _VidFrame
{
	int     width;
	int     height;
	void*   data;
	int     index;
};


DLL_EXPORT void vidInit(void);
DLL_EXPORT VidSource* vidOpen(const char* filename, int dstW, int dstH);
DLL_EXPORT void vidClose(VidSource* src);
DLL_EXPORT int vidUpdate(VidSource* src, double dt);
DLL_EXPORT void vidGetFrame(VidSource* src, VidFrame* frm);
DLL_EXPORT void vidRewind(VidSource* src);


#ifdef __cplusplus
}
#endif

#endif // GLVID_H
